-- GENERATED SPELL FOR [Swamplord Musel'ek] --


function spell0_17826(pUnit, Event) --@Aimed Shot,n/a--
pUnit:FullCastSpellOnTarget(31623,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17826', 5000, 1)
end

function spell1_17826(pUnit, Event) --@Bear Command,n/a--
pUnit:FullCastSpellOnTarget(34662,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17826', 771, 1)
end

function spell2_17826(pUnit, Event) --@Deterrence,Self--
pUnit:FullCastSpellOnTarget(31567,pUnit)
pUnit:RegisterEvent('Sorts_17826', 10378, 1)
end

function spell3_17826(pUnit, Event) --@Hunter\'s Mark,n/a--
pUnit:FullCastSpellOnTarget(31615,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17826', 20412, 1)
end

function spell4_17826(pUnit, Event) --@Knock Away,n/a--
pUnit:FullCastSpellOnTarget(18813,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17826', 730, 1)
end

function spell5_17826(pUnit, Event) --@Multi-Shot,n/a--
pUnit:FullCastSpellOnTarget(34974,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17826', 740, 1)
end

function spell6_17826(pUnit, Event) --@Notify of Death,n/a--
pUnit:FullCastSpellOnTarget(31547,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17826', 831, 1)
end

function spell7_17826(pUnit, Event) --@Raptor Strike,n/a--
pUnit:FullCastSpellOnTarget(31566,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17826', 839, 1)
end

function spell8_17826(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(22907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17826', 744, 1)
end

function spell9_17826(pUnit, Event) --@Throw Freezing Trap,n/a--
pUnit:FullCastSpellOnTarget(31946,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17826', 0, 1)
end

function Sorts_17826(pUnit, Event)
local choix_sorts_17826 = math.random(0, 9)
if choix_sorts_17826 == 0 then
pUnit:RegisterEvent('spell0_17826', 1, 1)
end
if choix_sorts_17826 == 1 then
pUnit:RegisterEvent('spell1_17826', 1, 1)
end
if choix_sorts_17826 == 2 then
pUnit:RegisterEvent('spell2_17826', 1, 1)
end
if choix_sorts_17826 == 3 then
pUnit:RegisterEvent('spell3_17826', 1, 1)
end
if choix_sorts_17826 == 4 then
pUnit:RegisterEvent('spell4_17826', 1, 1)
end
if choix_sorts_17826 == 5 then
pUnit:RegisterEvent('spell5_17826', 1, 1)
end
if choix_sorts_17826 == 6 then
pUnit:RegisterEvent('spell6_17826', 1, 1)
end
if choix_sorts_17826 == 7 then
pUnit:RegisterEvent('spell7_17826', 1, 1)
end
if choix_sorts_17826 == 8 then
pUnit:RegisterEvent('spell8_17826', 1, 1)
end
if choix_sorts_17826 == 9 then
pUnit:RegisterEvent('spell9_17826', 1, 1)
end
end

function mob17826_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17826', math.random(1500, 3000), 1)
end

function mob17826_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17826_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17826_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17826, 1, 'mob17826_Action')
RegisterUnitEvent(17826, 2, 'mob17826_Leave')
RegisterUnitEvent(17826, 3, 'mob17826_Kill')
RegisterUnitEvent(17826, 4, 'mob17826_Die')
